<template>
	<div>
			<Model v-bind:taskId="taskId" v-bind:userId="userId" ></Model>
		<div class="container">
        <!-- 审批信息 -->
        <div class="info-preview">
            <div class="h5-list-address content">
                <div class="h5-list-flex">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-address.png"></div>
                    	方案房产：
                </div>
                <div class="white h5-address">{{priceScheme.secheme}}</div>
            </div>
          
            
              <div class="h5-list-flex content h5-height-default h5-user-info border-top-bottom-green">
                <div class="item center-item border-right-green">
                    <div class="font12"><img src="../../assets/images/title-user.png">发起人</div>
                    <div class="white">{{priceScheme.createCN}}</div>
                </div>
                <div class="item center-item">
                    <div class="font12"><img src="../../assets/images/title-user.png">创建人</div>
                    <div class="white">{{priceScheme.createCN}}</div>
                </div>
            </div>
            
            <div class="content">
                <div class="h5-list-flex h5-apply-time">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-time.png"></div>
                    <div>申请时间：{{priceScheme.createTime}}</div>
                </div>
            </div>
        </div>
        <div class="h5-list border-top-bottom-default">
            <div class="h5-list-box">
                <div class="h5-list-flex h5-list-title border-bottom-primary green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-failure.png"></div>
                   	 失效原因
                </div>
                <div class="content">
                    <div class="h5-item-txt">{{priceScheme.invalidRemark}}</div>
                </div>
            </div>
        </div>
        <div class="h5-list after">
            <div class="h5-list-box">
                <div class="h5-list-flex h5-list-title border-bottom-primary green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-failure-info-after.png"></div>
                    	无效方案信息：
                </div>
                <div class="content">
                	<div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案名称：</div>
                        <div class="h5-item-content">{{priceScheme.name}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">计价方式：</div>
                        <div class="h5-item-content">{{priceScheme.valuationType}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案执行日期：</div>
                        <div class="h5-item-content">{{priceScheme.executionDate}}</div>
                    </div>
                    
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">方案说明：</div>
                        <div class="h5-item-content"></div>
                    </div>
                    <div class="h5-height-default h5-item-txt">
                    	{{priceScheme.remark}}
                    </div>
                </div>
            </div>
        </div>
           <!--设置单页面标题-->
	    <Document v-bind:processId="processId"></Document>
   		 <!-- 附件 -->
        <ActivityFile v-bind:objectId="objectId" v-bind:imageType="imageType"></ActivityFile>
        <!-- 审批进度 h-->
        <ActivityHistory v-bind:processId="processId" v-bind:userId="userId"></ActivityHistory>
    </div>
    <div class="md-overlay"></div>
    <div class="h5-btn-list">
       <a class="h5-btn h5-btn-primary md-trigger" data-modal="modal-1" style="width: 100%;">审核</a>
    </div>
	
		
	</div>
</template>

<script>
	import Document from '../common/document.vue'
	import ActivityFile from '../common/activityFile.vue';
	import ActivityHistory  from '../common/activityHistory.vue'
	import Model from '../common/modal.vue'
	export default{
		data(){
			return{
				imageType:'6',
				objectId:'',
				taskId:'',
				userId:'',
				processId:'',
				priceScheme:{}
			}
		},mounted:function(){
			this.initPriceSchemeInvalidInfo();
		},components: {
			Document,
			Model,
			ActivityFile,
			ActivityHistory
		},
		methods:{
			initPriceSchemeInvalidInfo:function(){
				var _self = this;
				var busKey = _self.$route.params.busKey;
				_self.objectId = busKey;
				_self.taskId = _self.$route.params.taskId;
				_self.userId = _self.$route.params.userId;
				_self.processId = _self.$route.params.processId;
				var params = {
					id:busKey
				};
				var url = _self.utilHelper.apiUrl+'/wordFlowData/priceSchemeInvalidInfo';
				_self.$http.post(url,params).then((response)=>{
					var body = response.body;
					if(body.res=="1"){
						_self.priceScheme = body.obj.priceScheme;
					}else{
						layer.alert("接口异常,请联系管理员!");
					}
				});
			}
		}
	}
</script>
